package xyz.cerberu.cet.resource.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xyz.cerberu.cet.resource.domian.Resource;

import java.sql.Date;
import java.util.List;

/**
 * @Name β世界
 * Created on 15:47
 * @Description Resource的dao
 */
@Mapper
public interface ResourceDao {

    int[] selectAnimeSubtitlegroups(@Param("ani_id")String ani_id);

    List<Resource> selectByAnime(@Param("ani_id") String ani_id);

    List<Resource> selectByAniSub(@Param("ani_id")String ani_id,@Param("sub_id")Integer sub_id);

    List<Resource> selectBySubID(@Param("sub_id")Integer sub_id);

    List<Resource> selectBySubtitle(@Param("sub_id") String sub_id);

    List<Resource> selectByTime(@Param("update_time") Date update_time);

    List<Resource> selectIntervalTime(@Param("endTime")Date endTime,@Param("startTime")Date starTime);

    List<Resource> selectRangeTimeBySubtitle(@Param("sub_id")int sub_id,@Param("endTime")Date endTime,@Param("startTime")Date starTime);

    int insertResource(@Param("resource") Resource resource);

    int deleteResourceByAnime(@Param("ani_id") String ani_id);

}
